﻿namespace CubeCube.World.Generator
{
    public class CubeWorldGenerator
    {
        private bool executed;
        private Chunk.Chunk chunk;


        //准备
        public virtual void Prepare()
        {
            executed = false;
        }

        public virtual int GetTotalCost()
        {
            return 1;
        }

        public virtual int GetCurrentCost()
        {
            if (executed)
                return 1;
            else
                return 0;
        }



        public virtual void BindChunk(Chunk.Chunk chunk)
        {
            this.chunk = chunk;
        }

        public virtual bool Generate()
        {
            return this.Generate(chunk);
        }

        public virtual bool Generate(Chunk.Chunk chunk)
        {
            return true;
        }
    }
}